Cosmetic products can be borderline with different other products. Some can be borderline with medicinal products, some with biocides, some with medical devices etc. Whether a product belongs to one product group or the other has to be determined on case-by-case basis.
The classification of a borderline product can often depend on the claims of the product – what product claims it does.
Find a link to the guidance documents published by the European Commission here: http://www.ceway.eu/INFO_Cosmetics_5_Is_it_cosmetics.html